const mysql = require("mysql2");

const pool = mysql.createPool({
  host: "localhost",
  user: "root",
  password: "123qweasd~!",
  database: "tcm_admin",
  waitForConnections: true,
  connectionLimit: 10,
  queueLimit: 0,
});

// 转换为 Promise 接口
const promisePool = pool.promise();

module.exports = promisePool;
